home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
program
/
eflibpt4.zip
/
DEMO
/
MISC
/
TIMER.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1996-08-15
|
946b
|
33 lines
{ Borland Pascal Extended Function Library - EFLIB (C) Johan Larsson, 1996
Demonstration; high-precision timing
EFLIB IS PROTECTED BY THE COPYRIGHT LAW AND MAY NOT BE COPIED, SOLD OR
MANIPULATED. FOR MORE INFORMATION, SEE PROGRAM MANUAL! THIS DEMONSTRAT-
ION PROGRAM MAY FREELY BE USED AND DISTRIBUTED. }
uses EFLIBDEF, EFLIBINI, EFLIBBAS, CRT;
var Timer : TimerObjectType;
Elapsed : real;
begin
WriteLn ('* High-precision timer and Pascal delay comparison *');
Timer.Initialize;
{ CRT delay }
Timer.Reset;
Delay (2000);
Elapsed := Timer.ElapsedMS;
WriteLn ('Borland Pascal delay took ', Elapsed:0:6, ' [ms] for a 2000 millesecond-delay');
{ EFLIB delay }
Timer.Reset;
Timer.Delay (2000);
Elapsed := Timer.ElapsedMS;
WriteLn ('EFLIB delay actually took ', Elapsed:0:6, ' [ms]');
Timer.Intercept;
end.